<!DOCTYPE html>
<html>
<head>
    <title>工装周期性检测工单</title>
    #parse("sys/header.html")
    <style>
        .urgeCss{
            background-color: red;
        }

        .leftHeight{
            height: 85vh;
            overflow: auto;
        }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
        .workShop{
            position: absolute;
            top: 0;
            width: 100%;
            height: 25px;
            background-color: white;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.devName" @on-enter="query" placeholder="设备名称"/>
                </i-col>
                <i-col span="3">
                    <i-select placeholder="是否含有未处理不合格项" v-model="q.isTreated">
                        <i-option v-for="item in ticketHandleStatusList" :value="item.value" :key="item.value">{{item.name}}
                        </i-option>
                    </i-select>
                </i-col>
                <i-col span="3">
                    <Date-picker type="month" v-model="q.checkMonth" placeholder="请选择工单执行月份"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("toolscheckticket:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolscheckticket:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolscheckticket:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <Row  :gutter="16" style="margin: 8px 0px 0px 1px;">
            <i-col :xs="3" :sm="4" :md="4" :lg="4">
                <div class="leftHeight" >
                    <div class="workShop">
                        <p class="text-center" style="font-size: 15px;">工厂/基地</p>
                    </div>
                    <div id="storeLayer" style="margin-top: 25px">
                        <ul id="storeTree" class="ztree"></ul>
                    </div>
                </div>
            </i-col>
            <i-col :xs="21" :sm="20" :md="20" :lg="20">
                <table  id="jqGrid"></table>
            </i-col>
        </Row>
        <!--<div style="height: 85vh;width:17%;overflow:auto;float:left;">-->
        <!--    <p class="text-center" style="font-size: 15px;">工厂/基地</p>-->
        <!--    <div id="storeLayer">-->
        <!--        <ul id="storeTree" class="ztree"></ul>-->
        <!--    </div>-->
        <!--</div>-->

    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsCheckTicket" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="备注" prop="remark">
                        <i-input v-model="toolsCheckTicket.remark" placeholder="备注"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="最近一次更新时间" prop="gmtModified">
                        <i-input v-model="toolsCheckTicket.gmtModified" placeholder="最近一次更新时间"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="创建时间" prop="gmtCreate">
                        <i-input v-model="toolsCheckTicket.gmtCreate" placeholder="创建时间"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="工单状态：执行中、完成、关闭" prop="state">
                        <i-input v-model="toolsCheckTicket.state" placeholder="工单状态：执行中、完成、关闭"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="结束日期" prop="endDate">
                        <i-input v-model="toolsCheckTicket.endDate" placeholder="结束日期"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="开始日期" prop="startDate">
                        <i-input v-model="toolsCheckTicket.startDate" placeholder="开始日期"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="设备ID" prop="devId">
                        <i-input v-model="toolsCheckTicket.devId" placeholder="设备ID"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="工装检测计划ID" prop="planId">
                        <i-input v-model="toolsCheckTicket.planId" placeholder="工装检测计划ID"/>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/tools/toolscheckticket.js?_${date.systemTime}"></script>
</body>
</html>
